<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title></title>
</head>
<body>
<ul>
	<li>1</li>
	<li>2</li>
	<li class="item">3</li>
	<li>4</li>
	<li>5</li>
</ul>

<script type="text/javascript">
	let item = document.getElementsByClassName('item')[0]

	//1.获取下一个兄弟
	console.log(item.nextSibling)
	//2.*** 获取下一个兄弟nextElementSibling
	console.log(item.nextElementSibling)
	//3.获取上一个兄弟（包含文本节点（空格，换行））previousSibling不实用
	console.log(item.previousSibling)

	//4.*****获取上一个兄弟previousElementSibling 
	console.log(item.previousElementSibling)
	
</script>
</body>
</html>